import { Routes, Route } from 'react-router-dom'
import { ConfigProvider } from 'antd'
import { Helmet } from 'react-helmet-async'
import Layout from './components/common/Layout'
import Home from './pages/Home'
import FamilyTree from './pages/FamilyTree'
import Honors from './pages/Honors'
import ClanRules from './pages/ClanRules'
import Profile from './pages/Profile'
import Login from './pages/Login'

function App() {
  return (
    <>
      <Helmet>
        <title>家族族谱管理系统</title>
        <meta name="description" content="现代化的家族族谱管理系统" />
      </Helmet>
      
      <ConfigProvider
        theme={{
          token: {
            colorPrimary: '#3b82f6',
          },
        }}
      >
        <Routes>
          <Route path="/login" element={<Login />} />
          <Route path="/" element={<Layout />}>
            <Route index element={<Home />} />
            <Route path="family-tree" element={<FamilyTree />} />
            <Route path="honors" element={<Honors />} />
            <Route path="clan-rules" element={<ClanRules />} />
            <Route path="profile" element={<Profile />} />
          </Route>
        </Routes>
      </ConfigProvider>
    </>
  )
}

export default App